package com.zx.mobile.service.proxy;

import org.apache.commons.lang3.StringUtils;

import com.zx.mobile.domain.ShareProfitRequest;
import com.zx.mobile.domain.ShareProfitResponse;

public class ShareProfitCommonProxy {

    /**
     * 分享收益合法性校验
     *
     * @return
     */
    public static String checkShareProfit(ShareProfitRequest shareProfitRequest) {
        if (StringUtils.isNotBlank(shareProfitRequest.getPlatformType())) {
            if (!("A".equals(shareProfitRequest.getPlatformType()) || "iPhone"
                    .equals(shareProfitRequest.getPlatformType()))) {
                return "平台类型不合法";
            }
        } else {
            return "输入项必填";
        }
        if (StringUtils.isBlank(shareProfitRequest.getAppUserId())) {
            return "输入项必填";
        }

        return null;
    }

    /**
     * 分享收益信息
     *
     * @param shareProfitRequest
     * @return
     */
    public static ShareProfitResponse getShareProfitResponse(
    		ShareProfitRequest shareProfitRequest) {
    	ShareProfitResponse shareProfitResponse = new ShareProfitResponse();
    	shareProfitResponse.setReturnCode("0000");
    	shareProfitResponse.setReturnMsg("分享收益获取成功");
        return shareProfitResponse;
    }
}
